﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace NCAABasketballTournament
{
    public partial class BracketDisplay : UserControl
    {
        public BracketDisplay()
        {
            InitializeComponent();
            Loaded += new RoutedEventHandler(OnLoaded);
        }

        void OnLoaded(object sender, RoutedEventArgs e)
        {
            Bracket oBracket = DataContext as Bracket;
            Round1.ItemsSource = oBracket.Round1;
            Round2.ItemsSource = oBracket.Round2;
            Round3.ItemsSource = oBracket.Round3;
            Round4.ItemsSource = oBracket.Round4;
            Round5.ItemsSource = oBracket.Round5;
        }
    }
}
